<style>

</style>
<template>
    <div class="">
        <Row>
            <Col offset="2">
                <Form :model="config" :label-width="120">
                    <FormItem label="关卡等级：" label-position="right">
                        <span>{{config.level}}</span>
                    </FormItem>
                    <FormItem label="关卡名称：" label-position="right">
                        <span>{{config.name}}</span>
                    </FormItem>
                    <FormItem label="每题回答时间(秒)：" label-position="right">
                        <span>{{config.answer_time}}</span>
                    </FormItem>
                    <FormItem label="关卡题目数：" label-position="right">
                        <span>{{config.num}}</span>
                    </FormItem>
                    <FormItem label="首答得分数：" label-position="right">
                        <span>{{config.first_score}}</span>
                    </FormItem>
                    <FormItem label="后答得分数：" label-position="right">
                        <span>{{config.last_score}}</span>
                    </FormItem>
                    <!-- <FormItem label="解锁星数要求：" label-position="right">
                        <span>{{config.stars}}</span>
                    </FormItem>
                    <FormItem label="胜利可得学分：" label-position="right">
                        <span>{{config.points}}</span>
                    </FormItem>
                    <FormItem label="全对额外奖励学分：" label-position="right">
                        <span>{{config.extra_points}}</span>
                    </FormItem> -->
                </Form>
            </Col>
        </Row>
    </div>
</template>
<script>
import http from '../../../libs/http';
export default {
    data () {
        return {
            config: {},
        }
    },
    methods: {
        getConfig (id) {
            var that = this;
            var url = 'admin/game/config/read/' + id;
            this.apiGet(url).then((res) => {
                if (res.code != 200) {
                    this.handleError(res);
                } else {
                    that.config = res.data;
                }
            })
        },
    },
    watch: {
        detailid: function(newid) {
            if(newid != null) {
                this.getConfig(newid);
            }
        }
    },
    props: ['detailid'],
    mixins:[http]
}
</script>